package formula.web.combo;

import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;

import formula.business.dao.DriverDao;
import formula.business.model.Level;

@ManagedBean(name = "levels")
@ViewScoped
public class LevelsCombo {

	private List<Level> levels;
	@ManagedProperty(value = DriverDao.EL_NAME)
	private DriverDao driverDao;

	@PostConstruct
	public void prepare() {
		levels = this.driverDao.selectLevel();
	}

	public void setDriverDao(DriverDao driverDao) {
		this.driverDao = driverDao;
	}

	public List<Level> getList() {
		return levels;
	}
}
